package ss.pku.meeting.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ParticipantsMapper {
    @Insert({
            "insert into participants(dept_id,apply_id) ",
            "values(#{deptId}, #{applyId})"
    })
    int insertPart(int deptId, int applyId);

    @Select({
            "select dept_id from participants",
            "where apply_id=#{appId}"
    })
    List<Integer> selectByAppId(int appId);
}
